<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		body{
			height: 2000px;
		}
		#d1{
			width: 400px;
			height: 400px;
			background-color: yellow;
			background-image: url('001.jpg');
			background-repeat: no-repeat;
			/*background-size:contain;*/
			/*background-size:cover;*/
			background-size:auto 300px;
			/*background-size:all;*/
			/*背景定位*/
			/*background-position: 50% ;*/
			/*background-position:center middle;*/
			/*背景固定*/
			background-attachment: fixed;
		}
	</style>
</head>
<body>
	<div id="d1"></div>
</body>
</html>